package Task

import (
	"ali-hr/Services/Async"
	"ali-hr/Util"
	"github.com/gin-gonic/gin"
)

/**
 * Created by Goland
 * User: wkk alisleepy@hotmail.com
 * Time: 2023/1/8 - 01:10
 * Desc: <消费异步任务>
 */

func ConsumeTask(c *gin.Context) {
	err := Async.HandleTask()
	if err != nil {
		Util.FailWithMessage("异步任务执行失败", c)
		return
	}
	Util.OkWithMessage("任务执行成功", c)
}
